import { TestCases } from "./testCases";
import { url } from "@kit.ArkTS";

export const substring:TestCases = {
  "testCases": [
    {
      "documentation": "substring when string is long enough",
      "params": {
        "TestCaseId": "1",
        "Input": "abcdefg"
      },
      "expect": {
        "error": "The value is: `abcd`"
      }
    },
    {
      "documentation": "substring when string is exactly the right length",
      "params": {
        "TestCaseId": "1",
        "Input": "abcd"
      },
      "expect": {
        "error": "The value is: `abcd`"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "1",
        "Input": "abc"
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "1",
        "Input": ""
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
      "params": {
        "TestCaseId": "1",
        "Input": "\ufdfd"
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring when string is long enough",
      "params": {
        "TestCaseId": "2",
        "Input": "abcdefg"
      },
      "expect": {
        "error": "The value is: `defg`"
      }
    },
    {
      "documentation": "substring when string is exactly the right length",
      "params": {
        "TestCaseId": "2",
        "Input": "defg"
      },
      "expect": {
        "error": "The value is: `defg`"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "2",
        "Input": "abc"
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "2",
        "Input": ""
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
      "params": {
        "TestCaseId": "2",
        "Input": "\ufdfd"
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring when string is longer",
      "params": {
        "TestCaseId": "3",
        "Input": "defg"
      },
      "expect": {
        "error": "The value is: `ef`"
      }
    },
    {
      "documentation": "substring when string is exact length",
      "params": {
        "TestCaseId": "3",
        "Input": "def"
      },
      "expect": {
        "error": "The value is: `ef`"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "3",
        "Input": "ab"
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring when string is too short",
      "params": {
        "TestCaseId": "3",
        "Input": ""
      },
      "expect": {
        "error": "No tests matched"
      }
    },
    {
      "documentation": "substring on wide characters (ensure that unicode code points are properly counted)",
      "params": {
        "TestCaseId": "3",
        "Input": "\ufdfd"
      },
      "expect": {
        "error": "No tests matched"
      }
    }
  ],
  "version": "1.4"
}
